import { NodeRoot } from "../Base/NodeRoot";
import { NMNode } from "../Base/NodeGraph";
@NMNode
export class EventEmit extends NodeRoot {
    public Node: any;
    public EventType: number;
    public isCompleted = false;
    private setNode: cc.Node;
    onEnter() {
        this.setNode = this.Node;
        if (!this.setNode) {
            this.setNode = this.ownerNode;
        }
        let eventName=EventType[this.EventType];
        this.setNode.emit(eventName, () => { this.isCompleted = true });
    }
    onStep(dt) {
        return this.isCompleted;
    }
}
export const EventType={
    0:cc.Node.EventType.TOUCH_START
}